<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }

    div {
      width: 200px;
      height: 200px;
      border: 2px solid red;
      margin: 0 auto;
    }

    ul {
      list-style: none;
    }

    /* ul > li {
      width: 100%;
      background-color: yellow;
      margin-top: 30px;
       1，直接给li加背景图 
      background: url("./1.png") no-repeat yellow; 
      padding-left: 30px;
      box-sizing: border-box;
    }
   */

    /* 
      2，用空标签添加修饰符
    */
    /* ul > li > span {
      display: inline-block;
      width: 24px;
      height: 26px;
      background: url("./1.png") no-repeat;
      vertical-align: -8px;
    } */

    /* 3、单加图片的对齐 */
    ul>li {
      height: 30px;
      width: 100%;
      background-color: yellow;
      margin-top: 30px;
      list-style: none;
    }
    ul>li>img {
      vertical-align: -8px;
    }
  </style>
</head>

<body>
  <div>
    <ul>
      <li>
        <!-- <span></span> -->
        <img src="./1.png" alt="">
        文字
      </li>
      <li>
        <!-- <span></span> -->
        <img src="./1.png" alt="">
        文字
      </li>
      <li>
        <!-- <span></span> -->
        <img src="./1.png" alt="">
        文字
      </li>
    </ul>
  </div>
</body>

</html>